package com.kylin.common;

import java.util.Hashtable;

import com.kylin.common.entity.SelectOption;

public class Constants {

	/**
	 *  request 的 attribute 中保存结果的key名
	 */
	public static final String KEY_REQUEST_RESULT = "key_request_result" ;

	/**
	 *  request 的 attribute 中保存异常的key名
	 */
	public static final String KEY_REQUEST_EXCEPTION = "key_request_exception" ;
	
	public static Hashtable dictionarys = new Hashtable();

	/**
	 *  内存中存放字典数据时使用的标示名，语言 数据字典
	 */
	public static final String DICT_NAME_LANGUAGE = "language" ;

	/**
	 *  内存中存放字典数据时使用的标示名，国家 数据字典
	 */
	public static final String DICT_NAME_COUNTRY = "country" ;
	
	 static  {
		 //这部分初始化在应用启动后从数据库取到内存
		SelectOption[] lang = new SelectOption[3];
		lang[0] = new SelectOption("汉语","chinese");
		lang[1] = new SelectOption("英语","English");
		lang[2] = new SelectOption("法语","france");
		dictionarys.put(DICT_NAME_LANGUAGE, lang);
		
		SelectOption[] country = new SelectOption[3];
		country[0] = new SelectOption("中国","china");
		country[1] = new SelectOption("俄罗斯","rus");
		country[2] = new SelectOption("美国","usa");
		dictionarys.put(DICT_NAME_COUNTRY, country);
		
	}
	
}
